Back
SEX:

Syntax:

  • SEX C5
Description:

The SEX instruction induces a software exception. The optional input C5 to the SEX instruction has the following function:

  • C5: When C5 = 1, the exception is conditioned by the top of the stack

It should be noted that the last value of the AGU is recorded, modulo 256, as a halt code on configuration register 0x20 (see the exceptions below).

Microcode Pattern:

Takes 30 cycles to execute.
    Example: SEX 0

	  
ADDR   DISP     C5  MCC   STKC  FLW  IOC  AGU   ASEL 
-----------------------------------------------------
05D4: 0000000a   0    -     -    -    -     E     -  
05D5: 00000000   0    -     -    -    -    -      -  
05D6: 00000000   0    -     -    -    -    -      -  
05D7: 00000000   0    -     -    -    -    -      -  
05D8: 00000000   0    -     -   SEX   -    -      -  
-----------------------------------------------------
— Microcode for the example below.

	  
Exceptions :

Configuration Register: 0x20 (CrMemExc)

[0] 00000000 00000002 RW SEX
[39:32] 000000FF 00000000 RW Halt Code By HALT & SEX (even if masked)

Example :

AGU_ED ZERO 0x0000000A
SEX 0                      
  !! Induces a software exception 
  !! with a halt code of 0xA

APE Group Zeuthen. 2003
$Id: sex_masm.php,v 1.2 2004/08/04 09:42:07 noe Exp $
$Id: syntax.php,v 1.8 2004/08/04 09:25:34 noe Exp $